package com.changou.page.listener;


import com.changou.page.config.RabbitMQConfig;
import com.changou.page.service.PageService;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class PageListener {
    @Autowired
     PageService pageService;

  @RabbitListener(queues = RabbitMQConfig.PAGE_CREATE_QUEUE)
    public void pageCreate(String spuId){
        System.out.println("page 接收到消息"+spuId);

   pageService.generateItemPage(spuId);

    }





}
